package com.chinaisafe.module.user.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

/**
 * SysRoleRespVO
 * Description：角色响应值对象
 *
 * @author tby
 * @date  2024-07-15 17:11:11
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@Schema(name = "SysRoleRespVO", description = "角色响应值对象")
public class SysRoleRespVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    private Long id;

    @Schema(description = "乐观锁版本")
    private Integer version;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "角色类型:超级管理员/平台管理员/系统管理员")
    private String type;

    @Schema(description = "是否启用")
    private Boolean enable;

    @Schema(description = "角色包含的用户")
    private List<User> users;
    @Data
    public static class User{
        @Schema(description = "用户id")
        private Long id;
        @Schema(description = "用户名")
        private String name;
    }

}
